//创建搜索队 传入位置
//S2 运输直升机
private ["_pos2", "_pos", "_group", "_box", "_roads"];

_pos2 = _this select 0;

_roads = [];
_roads = _pos2 nearRoads 800;
if(count _roads > 0) then
{
	_pos = getPos (selectRandom _roads);
}
else
{
	_pos = _pos2 getPos [800, random 360];
};
_group = createGroup west;
_group enableDynamicSimulation true;
_group setVariable["no_cleanup", true];

//
_box = createVehicle ["B_Heli_Transport_03_unarmed_F", _pos, [], 200, "FLY"];
_box enableDynamicSimulation true;
_box setVariable["no_cleanup", true];


_unit = _group createUnit ["B_Helipilot_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInDriver _box;

_unit = _group createUnit ["B_Helipilot_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

//x18
_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Engineer_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Engineer_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;

_unit = _group createUnit ["B_T_Soldier_PG_F", _pos, [], 0, "FORM"];
[_unit] call fn_initUnit;
_unit moveInAny _box;


/*
_box flyInHeight 150;
_box engineOn true;
_box move [position _box select 0, position _box select 1, 150];
while {(position _box) select 2 < 75} do 
{
	sleep 1;
};
*/
_box flyInHeight 175;

if(Param_Debug == 1)then{
	_group addGroupIcon ["b_inf",[0,0]];
	_group setGroupIconParams [[1,1,0,1],"侦察兵S2",1,true];
};

[_group] spawn fn_controlSearch;
